import request from '@/utils/request'

export default {
    indexAllPermission() {
        return request({
            url: `acl/permission/indexAllPermission`,
            method: 'get',
        })
    },

    remove(id) {
        return request({
            url: `acl/permission/remove/${id}`,
            method: 'delete',
        })
    },

    save(permission) {
        return request({
            url: `acl/permission/save`,
            method: 'put',
            params: { ...permission }
        })
    },

    update(permission) {
        return request({
            url: `acl/permission/update`,
            method: 'post',
            data: permission
        })
    },

    doAssign(roleId, permissionIds) {
        return request({
            url: `acl/permission/doAssign/${roleId}`,
            method: 'post',
            data: permissionIds,
        })
    },

    toAssign(roleId) {
        return request({
            url: `acl/permission/toAssign/${roleId}`,
            method: 'get',
        })
    }



}






